package previous.Test_0307;

import java.util.Scanner;

/**
 * Created with Intellij IDEA
 * Description:
 * User: 星辰
 */
public class Blue_bridge {
    //子集之和
    static long sum;
    static long x;
    static int n;
    public static void main1(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        n=scan.nextInt();
        x=scan.nextLong();
        Long[] a=new Long[n];
        sum=0;
        for (int i = 0; i < n; i++) {
            a[i]=scan.nextLong();
        }
        System.out.println(dfs(a,0)==true? 'Y':'N');
        scan.close();
    }
    public static boolean dfs(Long[] a,int pos){
        //结束条件
        if(sum==x) return true;
        if(pos>=n || sum>x){
            return false;
        }
        //选
        sum+=a[pos];
        if(dfs(a,pos+1)) return true;
        //不选
        sum-=a[pos];
        if(dfs(a,pos+1)) return true;
        return false;
    }

}
